(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
length(nil) → 0
length(cons(x, xs)) → s(length(xs))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, nil) → 0
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))

Rewrite Strategy: INNERMOST

(1) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(2) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
length(nil) → 0'
length(cons(x, xs)) → s(length(xs))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
get(n, nil) → 0'
get(n, cons(x, nil)) → x
get(0', cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))

S is empty.
Rewrite Strategy: INNERMOST

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

Innermost TRS:
Rules:
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
length(nil) → 0'
length(cons(x, xs)) → s(length(xs))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
get(n, nil) → 0'
get(n, cons(x, nil)) → x
get(0', cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))

Types:
qsort :: nil:cons:ys → nil:cons:ys
qs :: 0':s → nil:cons:ys → nil:cons:ys
half :: 0':s → 0':s
length :: nil:cons:ys → 0':s
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
get :: 0':s → nil:cons:ys → 0':s
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

(5) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
qs, half, length, append, filterlow, get, filterhigh, ge

They will be analysed ascendingly in the following order:
half < qs
append < qs
filterlow < qs
get < qs
filterhigh < qs
ge < filterlow
ge < filterhigh

(6) Obligation:

Innermost TRS:
Rules:
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
length(nil) → 0'
length(cons(x, xs)) → s(length(xs))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
get(n, nil) → 0'
get(n, cons(x, nil)) → x
get(0', cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))

Types:
qsort :: nil:cons:ys → nil:cons:ys
qs :: 0':s → nil:cons:ys → nil:cons:ys
half :: 0':s → 0':s
length :: nil:cons:ys → 0':s
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
get :: 0':s → nil:cons:ys → 0':s
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

The following defined symbols remain to be analysed:
half, qs, length, append, filterlow, get, filterhigh, ge

They will be analysed ascendingly in the following order:
half < qs
append < qs
filterlow < qs
get < qs
filterhigh < qs
ge < filterlow
ge < filterhigh

(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)

Induction Base:
half(gen_0':s5_0(*(2, 0))) →RΩ(1)
0'

Induction Step:
half(gen_0':s5_0(*(2, +(n7_0, 1)))) →RΩ(1)
s(half(gen_0':s5_0(*(2, n7_0)))) →IH
s(gen_0':s5_0(c8_0))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(8) Complex Obligation (BEST)

(9) Obligation:

Innermost TRS:
Rules:
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
length(nil) → 0'
length(cons(x, xs)) → s(length(xs))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
get(n, nil) → 0'
get(n, cons(x, nil)) → x
get(0', cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))

Types:
qsort :: nil:cons:ys → nil:cons:ys
qs :: 0':s → nil:cons:ys → nil:cons:ys
half :: 0':s → 0':s
length :: nil:cons:ys → 0':s
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
get :: 0':s → nil:cons:ys → 0':s
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

The following defined symbols remain to be analysed:
length, qs, append, filterlow, get, filterhigh, ge

They will be analysed ascendingly in the following order:
append < qs
filterlow < qs
get < qs
filterhigh < qs
ge < filterlow
ge < filterhigh

(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
length(gen_nil:cons:ys4_0(n455_0)) → gen_0':s5_0(n455_0), rt ∈ Ω(1 + n4550)

Induction Base:
length(gen_nil:cons:ys4_0(0)) →RΩ(1)
0'

Induction Step:
length(gen_nil:cons:ys4_0(+(n455_0, 1))) →RΩ(1)
s(length(gen_nil:cons:ys4_0(n455_0))) →IH
s(gen_0':s5_0(c456_0))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(11) Complex Obligation (BEST)

(12) Obligation:

Innermost TRS:
Rules:
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
length(nil) → 0'
length(cons(x, xs)) → s(length(xs))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
get(n, nil) → 0'
get(n, cons(x, nil)) → x
get(0', cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))

Types:
qsort :: nil:cons:ys → nil:cons:ys
qs :: 0':s → nil:cons:ys → nil:cons:ys
half :: 0':s → 0':s
length :: nil:cons:ys → 0':s
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
get :: 0':s → nil:cons:ys → 0':s
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
length(gen_nil:cons:ys4_0(n455_0)) → gen_0':s5_0(n455_0), rt ∈ Ω(1 + n4550)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

The following defined symbols remain to be analysed:
append, qs, filterlow, get, filterhigh, ge

They will be analysed ascendingly in the following order:
append < qs
filterlow < qs
get < qs
filterhigh < qs
ge < filterlow
ge < filterhigh

(13) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol append.

(14) Obligation:

Innermost TRS:
Rules:
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
length(nil) → 0'
length(cons(x, xs)) → s(length(xs))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
get(n, nil) → 0'
get(n, cons(x, nil)) → x
get(0', cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))

Types:
qsort :: nil:cons:ys → nil:cons:ys
qs :: 0':s → nil:cons:ys → nil:cons:ys
half :: 0':s → 0':s
length :: nil:cons:ys → 0':s
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
get :: 0':s → nil:cons:ys → 0':s
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
length(gen_nil:cons:ys4_0(n455_0)) → gen_0':s5_0(n455_0), rt ∈ Ω(1 + n4550)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

The following defined symbols remain to be analysed:
get, qs, filterlow, filterhigh, ge

They will be analysed ascendingly in the following order:
filterlow < qs
get < qs
filterhigh < qs
ge < filterlow
ge < filterhigh

(15) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
get(gen_0':s5_0(n825_0), gen_nil:cons:ys4_0(+(1, n825_0))) → gen_0':s5_0(0), rt ∈ Ω(1 + n8250)

Induction Base:
get(gen_0':s5_0(0), gen_nil:cons:ys4_0(+(1, 0))) →RΩ(1)
0'

Induction Step:
get(gen_0':s5_0(+(n825_0, 1)), gen_nil:cons:ys4_0(+(1, +(n825_0, 1)))) →RΩ(1)
get(gen_0':s5_0(n825_0), cons(0', gen_nil:cons:ys4_0(n825_0))) →IH
gen_0':s5_0(0)

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(16) Complex Obligation (BEST)

(17) Obligation:

Innermost TRS:
Rules:
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
length(nil) → 0'
length(cons(x, xs)) → s(length(xs))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
get(n, nil) → 0'
get(n, cons(x, nil)) → x
get(0', cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))

Types:
qsort :: nil:cons:ys → nil:cons:ys
qs :: 0':s → nil:cons:ys → nil:cons:ys
half :: 0':s → 0':s
length :: nil:cons:ys → 0':s
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
get :: 0':s → nil:cons:ys → 0':s
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
length(gen_nil:cons:ys4_0(n455_0)) → gen_0':s5_0(n455_0), rt ∈ Ω(1 + n4550)
get(gen_0':s5_0(n825_0), gen_nil:cons:ys4_0(+(1, n825_0))) → gen_0':s5_0(0), rt ∈ Ω(1 + n8250)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

The following defined symbols remain to be analysed:
ge, qs, filterlow, filterhigh

They will be analysed ascendingly in the following order:
filterlow < qs
filterhigh < qs
ge < filterlow
ge < filterhigh

(18) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
ge(gen_0':s5_0(n1965_0), gen_0':s5_0(n1965_0)) → true, rt ∈ Ω(1 + n19650)

Induction Base:
ge(gen_0':s5_0(0), gen_0':s5_0(0)) →RΩ(1)
true

Induction Step:
ge(gen_0':s5_0(+(n1965_0, 1)), gen_0':s5_0(+(n1965_0, 1))) →RΩ(1)
ge(gen_0':s5_0(n1965_0), gen_0':s5_0(n1965_0)) →IH
true

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(19) Complex Obligation (BEST)

(20) Obligation:

Innermost TRS:
Rules:
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
length(nil) → 0'
length(cons(x, xs)) → s(length(xs))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
get(n, nil) → 0'
get(n, cons(x, nil)) → x
get(0', cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))

Types:
qsort :: nil:cons:ys → nil:cons:ys
qs :: 0':s → nil:cons:ys → nil:cons:ys
half :: 0':s → 0':s
length :: nil:cons:ys → 0':s
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
get :: 0':s → nil:cons:ys → 0':s
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
length(gen_nil:cons:ys4_0(n455_0)) → gen_0':s5_0(n455_0), rt ∈ Ω(1 + n4550)
get(gen_0':s5_0(n825_0), gen_nil:cons:ys4_0(+(1, n825_0))) → gen_0':s5_0(0), rt ∈ Ω(1 + n8250)
ge(gen_0':s5_0(n1965_0), gen_0':s5_0(n1965_0)) → true, rt ∈ Ω(1 + n19650)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

The following defined symbols remain to be analysed:
filterlow, qs, filterhigh

They will be analysed ascendingly in the following order:
filterlow < qs
filterhigh < qs

(21) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
filterlow(gen_0':s5_0(0), gen_nil:cons:ys4_0(n2402_0)) → gen_nil:cons:ys4_0(0), rt ∈ Ω(1 + n24020)

Induction Base:
filterlow(gen_0':s5_0(0), gen_nil:cons:ys4_0(0)) →RΩ(1)
nil

Induction Step:
filterlow(gen_0':s5_0(0), gen_nil:cons:ys4_0(+(n2402_0, 1))) →RΩ(1)
if1(ge(gen_0':s5_0(0), 0'), gen_0':s5_0(0), 0', gen_nil:cons:ys4_0(n2402_0)) →LΩ(1)
if1(true, gen_0':s5_0(0), 0', gen_nil:cons:ys4_0(n2402_0)) →RΩ(1)
filterlow(gen_0':s5_0(0), gen_nil:cons:ys4_0(n2402_0)) →IH
gen_nil:cons:ys4_0(0)

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(22) Complex Obligation (BEST)

(23) Obligation:

Innermost TRS:
Rules:
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
length(nil) → 0'
length(cons(x, xs)) → s(length(xs))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
get(n, nil) → 0'
get(n, cons(x, nil)) → x
get(0', cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))

Types:
qsort :: nil:cons:ys → nil:cons:ys
qs :: 0':s → nil:cons:ys → nil:cons:ys
half :: 0':s → 0':s
length :: nil:cons:ys → 0':s
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
get :: 0':s → nil:cons:ys → 0':s
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
length(gen_nil:cons:ys4_0(n455_0)) → gen_0':s5_0(n455_0), rt ∈ Ω(1 + n4550)
get(gen_0':s5_0(n825_0), gen_nil:cons:ys4_0(+(1, n825_0))) → gen_0':s5_0(0), rt ∈ Ω(1 + n8250)
ge(gen_0':s5_0(n1965_0), gen_0':s5_0(n1965_0)) → true, rt ∈ Ω(1 + n19650)
filterlow(gen_0':s5_0(0), gen_nil:cons:ys4_0(n2402_0)) → gen_nil:cons:ys4_0(0), rt ∈ Ω(1 + n24020)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

The following defined symbols remain to be analysed:
filterhigh, qs

They will be analysed ascendingly in the following order:
filterhigh < qs

(24) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
filterhigh(gen_0':s5_0(0), gen_nil:cons:ys4_0(n3283_0)) → gen_nil:cons:ys4_0(0), rt ∈ Ω(1 + n32830)

Induction Base:
filterhigh(gen_0':s5_0(0), gen_nil:cons:ys4_0(0)) →RΩ(1)
nil

Induction Step:
filterhigh(gen_0':s5_0(0), gen_nil:cons:ys4_0(+(n3283_0, 1))) →RΩ(1)
if2(ge(0', gen_0':s5_0(0)), gen_0':s5_0(0), 0', gen_nil:cons:ys4_0(n3283_0)) →LΩ(1)
if2(true, gen_0':s5_0(0), 0', gen_nil:cons:ys4_0(n3283_0)) →RΩ(1)
filterhigh(gen_0':s5_0(0), gen_nil:cons:ys4_0(n3283_0)) →IH
gen_nil:cons:ys4_0(0)

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(25) Complex Obligation (BEST)

(26) Obligation:

Innermost TRS:
Rules:
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
length(nil) → 0'
length(cons(x, xs)) → s(length(xs))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
get(n, nil) → 0'
get(n, cons(x, nil)) → x
get(0', cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))

Types:
qsort :: nil:cons:ys → nil:cons:ys
qs :: 0':s → nil:cons:ys → nil:cons:ys
half :: 0':s → 0':s
length :: nil:cons:ys → 0':s
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
get :: 0':s → nil:cons:ys → 0':s
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
length(gen_nil:cons:ys4_0(n455_0)) → gen_0':s5_0(n455_0), rt ∈ Ω(1 + n4550)
get(gen_0':s5_0(n825_0), gen_nil:cons:ys4_0(+(1, n825_0))) → gen_0':s5_0(0), rt ∈ Ω(1 + n8250)
ge(gen_0':s5_0(n1965_0), gen_0':s5_0(n1965_0)) → true, rt ∈ Ω(1 + n19650)
filterlow(gen_0':s5_0(0), gen_nil:cons:ys4_0(n2402_0)) → gen_nil:cons:ys4_0(0), rt ∈ Ω(1 + n24020)
filterhigh(gen_0':s5_0(0), gen_nil:cons:ys4_0(n3283_0)) → gen_nil:cons:ys4_0(0), rt ∈ Ω(1 + n32830)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

The following defined symbols remain to be analysed:
qs

(27) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol qs.

(28) Obligation:

Innermost TRS:
Rules:
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
length(nil) → 0'
length(cons(x, xs)) → s(length(xs))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
get(n, nil) → 0'
get(n, cons(x, nil)) → x
get(0', cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))

Types:
qsort :: nil:cons:ys → nil:cons:ys
qs :: 0':s → nil:cons:ys → nil:cons:ys
half :: 0':s → 0':s
length :: nil:cons:ys → 0':s
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
get :: 0':s → nil:cons:ys → 0':s
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
length(gen_nil:cons:ys4_0(n455_0)) → gen_0':s5_0(n455_0), rt ∈ Ω(1 + n4550)
get(gen_0':s5_0(n825_0), gen_nil:cons:ys4_0(+(1, n825_0))) → gen_0':s5_0(0), rt ∈ Ω(1 + n8250)
ge(gen_0':s5_0(n1965_0), gen_0':s5_0(n1965_0)) → true, rt ∈ Ω(1 + n19650)
filterlow(gen_0':s5_0(0), gen_nil:cons:ys4_0(n2402_0)) → gen_nil:cons:ys4_0(0), rt ∈ Ω(1 + n24020)
filterhigh(gen_0':s5_0(0), gen_nil:cons:ys4_0(n3283_0)) → gen_nil:cons:ys4_0(0), rt ∈ Ω(1 + n32830)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

No more defined symbols left to analyse.

(29) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)

(30) BOUNDS(n^1, INF)

(31) Obligation:

Innermost TRS:
Rules:
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
length(nil) → 0'
length(cons(x, xs)) → s(length(xs))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
get(n, nil) → 0'
get(n, cons(x, nil)) → x
get(0', cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))

Types:
qsort :: nil:cons:ys → nil:cons:ys
qs :: 0':s → nil:cons:ys → nil:cons:ys
half :: 0':s → 0':s
length :: nil:cons:ys → 0':s
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
get :: 0':s → nil:cons:ys → 0':s
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
length(gen_nil:cons:ys4_0(n455_0)) → gen_0':s5_0(n455_0), rt ∈ Ω(1 + n4550)
get(gen_0':s5_0(n825_0), gen_nil:cons:ys4_0(+(1, n825_0))) → gen_0':s5_0(0), rt ∈ Ω(1 + n8250)
ge(gen_0':s5_0(n1965_0), gen_0':s5_0(n1965_0)) → true, rt ∈ Ω(1 + n19650)
filterlow(gen_0':s5_0(0), gen_nil:cons:ys4_0(n2402_0)) → gen_nil:cons:ys4_0(0), rt ∈ Ω(1 + n24020)
filterhigh(gen_0':s5_0(0), gen_nil:cons:ys4_0(n3283_0)) → gen_nil:cons:ys4_0(0), rt ∈ Ω(1 + n32830)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

No more defined symbols left to analyse.

(32) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)

(33) BOUNDS(n^1, INF)

(34) Obligation:

Innermost TRS:
Rules:
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
length(nil) → 0'
length(cons(x, xs)) → s(length(xs))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
get(n, nil) → 0'
get(n, cons(x, nil)) → x
get(0', cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))

Types:
qsort :: nil:cons:ys → nil:cons:ys
qs :: 0':s → nil:cons:ys → nil:cons:ys
half :: 0':s → 0':s
length :: nil:cons:ys → 0':s
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
get :: 0':s → nil:cons:ys → 0':s
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
length(gen_nil:cons:ys4_0(n455_0)) → gen_0':s5_0(n455_0), rt ∈ Ω(1 + n4550)
get(gen_0':s5_0(n825_0), gen_nil:cons:ys4_0(+(1, n825_0))) → gen_0':s5_0(0), rt ∈ Ω(1 + n8250)
ge(gen_0':s5_0(n1965_0), gen_0':s5_0(n1965_0)) → true, rt ∈ Ω(1 + n19650)
filterlow(gen_0':s5_0(0), gen_nil:cons:ys4_0(n2402_0)) → gen_nil:cons:ys4_0(0), rt ∈ Ω(1 + n24020)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

No more defined symbols left to analyse.

(35) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)

(36) BOUNDS(n^1, INF)

(37) Obligation:

Innermost TRS:
Rules:
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
length(nil) → 0'
length(cons(x, xs)) → s(length(xs))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
get(n, nil) → 0'
get(n, cons(x, nil)) → x
get(0', cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))

Types:
qsort :: nil:cons:ys → nil:cons:ys
qs :: 0':s → nil:cons:ys → nil:cons:ys
half :: 0':s → 0':s
length :: nil:cons:ys → 0':s
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
get :: 0':s → nil:cons:ys → 0':s
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
length(gen_nil:cons:ys4_0(n455_0)) → gen_0':s5_0(n455_0), rt ∈ Ω(1 + n4550)
get(gen_0':s5_0(n825_0), gen_nil:cons:ys4_0(+(1, n825_0))) → gen_0':s5_0(0), rt ∈ Ω(1 + n8250)
ge(gen_0':s5_0(n1965_0), gen_0':s5_0(n1965_0)) → true, rt ∈ Ω(1 + n19650)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

No more defined symbols left to analyse.

(38) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)

(39) BOUNDS(n^1, INF)

(40) Obligation:

Innermost TRS:
Rules:
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
length(nil) → 0'
length(cons(x, xs)) → s(length(xs))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
get(n, nil) → 0'
get(n, cons(x, nil)) → x
get(0', cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))

Types:
qsort :: nil:cons:ys → nil:cons:ys
qs :: 0':s → nil:cons:ys → nil:cons:ys
half :: 0':s → 0':s
length :: nil:cons:ys → 0':s
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
get :: 0':s → nil:cons:ys → 0':s
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
length(gen_nil:cons:ys4_0(n455_0)) → gen_0':s5_0(n455_0), rt ∈ Ω(1 + n4550)
get(gen_0':s5_0(n825_0), gen_nil:cons:ys4_0(+(1, n825_0))) → gen_0':s5_0(0), rt ∈ Ω(1 + n8250)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

No more defined symbols left to analyse.

(41) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)

(42) BOUNDS(n^1, INF)

(43) Obligation:

Innermost TRS:
Rules:
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
length(nil) → 0'
length(cons(x, xs)) → s(length(xs))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
get(n, nil) → 0'
get(n, cons(x, nil)) → x
get(0', cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))

Types:
qsort :: nil:cons:ys → nil:cons:ys
qs :: 0':s → nil:cons:ys → nil:cons:ys
half :: 0':s → 0':s
length :: nil:cons:ys → 0':s
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
get :: 0':s → nil:cons:ys → 0':s
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
length(gen_nil:cons:ys4_0(n455_0)) → gen_0':s5_0(n455_0), rt ∈ Ω(1 + n4550)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

No more defined symbols left to analyse.

(44) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)

(45) BOUNDS(n^1, INF)

(46) Obligation:

Innermost TRS:
Rules:
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
length(nil) → 0'
length(cons(x, xs)) → s(length(xs))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
get(n, nil) → 0'
get(n, cons(x, nil)) → x
get(0', cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))

Types:
qsort :: nil:cons:ys → nil:cons:ys
qs :: 0':s → nil:cons:ys → nil:cons:ys
half :: 0':s → 0':s
length :: nil:cons:ys → 0':s
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
get :: 0':s → nil:cons:ys → 0':s
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

No more defined symbols left to analyse.

(47) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
half(gen_0':s5_0(*(2, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)

(48) BOUNDS(n^1, INF)